package com.itextpdf.local.ess.verify;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

public class VerifySignInfo {

    private String name;
    private List<SignatureDetail> signatureDetails = new ArrayList<>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public List<SignatureDetail> getSignatureDetails() {
        return signatureDetails;
    }

    public void setSignatureDetails(List<SignatureDetail> signatureDetails) {
        this.signatureDetails = signatureDetails;
    }

    public static class SignatureDetail {
        public String name;
        // 签名日期时间
        public Date time;
        // 有效期开始时间
        public Date notBefore;
        // 有效期
        public Date notAfter;
        // 证书名称
        public String dnName;
        // 序列号
        public BigInteger serialNumber;
        // 证书格式 // 证书颁发者
        public byte[] pubKey;
        public String     pubKeyFormat, sigAlgName, userDnName;
        public boolean res;
        public String imageContent, imagePath;
        public int imageWidth, imageHeight;
        public String reason, location;

        public int page;
        public float llx, lly, urx, ury;

        public byte[] fileBase64;

        private boolean documentVerify;

        private boolean completeVerify;

        private boolean certVerify;


        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Date getTime() {
            return time;
        }

        public void setTime(Date time) {
            this.time = time;
        }

        public Date getNotBefore() {
            return notBefore;
        }

        public void setNotBefore(Date notBefore) {
            this.notBefore = notBefore;
        }

        public Date getNotAfter() {
            return notAfter;
        }

        public void setNotAfter(Date notAfter) {
            this.notAfter = notAfter;
        }

        public String getDnName() {
            return dnName;
        }

        public void setDnName(String dnName) {
            this.dnName = dnName;
        }

        public BigInteger getSerialNumber() {
            return serialNumber;
        }

        public void setSerialNumber(BigInteger serialNumber) {
            this.serialNumber = serialNumber;
        }

        public byte[] getPubKey() {
            return pubKey;
        }

        public void setPubKey(byte[] pubKey) {
            this.pubKey = pubKey;
        }

        public String getPubKeyFormat() {
            return pubKeyFormat;
        }

        public void setPubKeyFormat(String pubKeyFormat) {
            this.pubKeyFormat = pubKeyFormat;
        }

        public String getSigAlgName() {
            return sigAlgName;
        }

        public void setSigAlgName(String sigAlgName) {
            this.sigAlgName = sigAlgName;
        }

        public String getUserDnName() {
            return userDnName;
        }

        public void setUserDnName(String userDnName) {
            this.userDnName = userDnName;
        }

        public boolean isRes() {
            return res;
        }

        public void setRes(boolean res) {
            this.res = res;
        }

        public String getImageContent() {
            return imageContent;
        }

        public void setImageContent(String imageContent) {
            this.imageContent = imageContent;
        }

        public String getImagePath() {
            return imagePath;
        }

        public void setImagePath(String imagePath) {
            this.imagePath = imagePath;
        }

        public int getImageWidth() {
            return imageWidth;
        }

        public void setImageWidth(int imageWidth) {
            this.imageWidth = imageWidth;
        }

        public int getImageHeight() {
            return imageHeight;
        }

        public void setImageHeight(int imageHeight) {
            this.imageHeight = imageHeight;
        }

        public String getReason() {
            return reason;
        }

        public void setReason(String reason) {
            this.reason = reason;
        }

        public String getLocation() {
            return location;
        }

        public void setLocation(String location) {
            this.location = location;
        }

        public int getPage() {
            return page;
        }

        public void setPage(int page) {
            this.page = page;
        }

        public float getLlx() {
            return llx;
        }

        public void setLlx(float llx) {
            this.llx = llx;
        }

        public float getLly() {
            return lly;
        }

        public void setLly(float lly) {
            this.lly = lly;
        }

        public float getUrx() {
            return urx;
        }

        public void setUrx(float urx) {
            this.urx = urx;
        }

        public float getUry() {
            return ury;
        }

        public void setUry(float ury) {
            this.ury = ury;
        }

        public byte[] getFileBase64() {
            return fileBase64;
        }

        public void setFileBase64(byte[] fileBase64) {
            this.fileBase64 = fileBase64;
        }


        public boolean isDocumentVerify() {
            return documentVerify;
        }

        public void setDocumentVerify(boolean documentVerify) {
            this.documentVerify = documentVerify;
        }

        public boolean isCompleteVerify() {
            return completeVerify;
        }

        public void setCompleteVerify(boolean completeVerify) {
            this.completeVerify = completeVerify;
        }

        public boolean isCertVerify() {
            return certVerify;
        }

        public void setCertVerify(boolean certVerify) {
            this.certVerify = certVerify;
        }

        @Override
        public String toString() {
            return "{" +
                    "name:'" + name + '\'' +
                    ", time:" + time +
                    ", notBefore:" + notBefore +
                    ", notAfter:" + notAfter +
                    ", dnName:'" + dnName + '\'' +
                    ", serialNumber:" + serialNumber +
                    ", pubKey:" + Arrays.toString(pubKey) +
                    ", pubKeyFormat:'" + pubKeyFormat + '\'' +
                    ", sigAlgName:'" + sigAlgName + '\'' +
                    ", userDnName:'" + userDnName + '\'' +
                    ", res:" + res +
                    ", imageContent:'" + imageContent + '\'' +
                    ", imagePath:'" + imagePath + '\'' +
                    ", imageWidth:" + imageWidth +
                    ", imageHeight:" + imageHeight +
                    ", reason:'" + reason + '\'' +
                    ", location:'" + location + '\'' +
                    ", page:" + page +
                    ", llx:" + llx +
                    ", lly:" + lly +
                    ", urx:" + urx +
                    ", ury:" + ury +
                    ", fileBase64:" + Arrays.toString(fileBase64) +
                    ", documentVerify:" + documentVerify +
                    ", completeVerify:" + completeVerify +
                    ", certVerify:" + certVerify +
                    '}';
        }
    }


    @Override
    public String toString() {
        return "{" +
                "name:'" + name + '\'' +
                ", signatureDetails:" + signatureDetails +
                '}';
    }
}
